{% extends 'admin/public/base.html' %}


{% block con-header %}
<div class="container-fluid am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-9">
            <div class="page-header-heading">
                <span class="am-icon-home page-header-heading-icon"></span>
                订单详情
            </div>
        </div>
    </div>
</div>
{% endblock %}

{% block con-footer %}
<div class="row-content am-cf">
	<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
	    <div class="widget am-cf">
	        <div class="widget-head am-cf">
	            <div class="widget-title am-fl">商品信息</div>
	            <div class="widget-function am-fr">
	                <!-- <a href="javascript:;" class="am-icon-cog"></a> -->
	            </div>
	        </div>
	        <div class="widget-body am-fr">
	            <form class="am-form tpl-form-line-form" action="" method="post" enctype="multipart/form-data">
	                <!-- 订单号 -->
	                <div class="am-form-group">
	                    <label for="user-name" class="am-u-sm-3 am-form-label">
	                    	订单号
	                    </label>
	                    <div class="am-u-sm-9">
	                        <input type="text" class="tpl-form-input" id="user-name" value="{{ oinfo.id }}" name="title" disabled>
	                    </div>
	                </div>
	                <!-- 订单时间 -->
	                <div class="am-form-group">
	                    <label for="user-name" class="am-u-sm-3 am-form-label">
	                    	订单时间
	                    </label>
	                    <div class="am-u-sm-9">
	                        <input type="text" class="tpl-form-input" id="user-name" value="{{ oinfo.addtime|date:'Y-m-d H:i:s' }}" name="price" disabled>
	                    </div>
	                </div>
	                <!-- 订单用户 -->
	                <div class="am-form-group">
	                    <label for="user-name" class="am-u-sm-3 am-form-label">
	                    	订单用户
	                    </label>
	                    <div class="am-u-sm-9">
	                        <input type="text" class="tpl-form-input" id="user-name" value="{{ oinfo.uid.username }}" name="storage" disabled>
	                    </div>
	                </div>
	                <!-- 总价 -->
	                <div class="am-form-group">
	                    <label for="user-name" class="am-u-sm-3 am-form-label">
	                    	订单总价
	                    </label>
	                    <div class="am-u-sm-9">
	                        <input type="text" class="tpl-form-input" id="user-name" value="{{ oinfo.totalprice }}" name="storage" disabled>
	                    </div>
	                </div>
	                <!-- 订单总数 -->
	                <div class="am-form-group">
	                    <label for="user-name" class="am-u-sm-3 am-form-label">
	                    	商品总数
	                    </label>
	                    <div class="am-u-sm-9">
	                        <input type="text" class="tpl-form-input" id="user-name" value="{{ oinfo.totalnum }}" name="storage" disabled>
	                    </div>
	                </div>
	                <!-- 状态 -->
	                <div class="am-form-group">
	                    <label for="user-name" class="am-u-sm-3 am-form-label">
	                    	订单状态
	                    </label>
	                    <div class="am-u-sm-9">
	                        <input type="text" class="tpl-form-input" id="user-name" 
							{% if oinfo.status == 1 %}
	                        value="未付款" 
	                        {% elif oinfo.status == 2 %}
	                        value="待发货" 
	                        {% elif oinfo.status == 3 %}
	                        value="待收货" 
	                        {% elif oinfo.status == 4 %}
	                        value="已完成" 
	                        {% elif oinfo.status == 5 %}
	                        value="已取消" 
	                        {% endif %}
	                        name="storage" disabled>
	                    </div>
	                </div>
	                <!-- 购买的商品 -->


	                <!-- 购买商品 数量 价格 -->
	                {% for v in oinfo.orderinfo_set.all %}
	                <div class="am-form-group">
	                	<label for="user-name" class="am-u-sm-3 am-form-label">
	                    	商品
	                    </label>
	                    <div class="am-u-sm-9 ">
	                        <input type="text" class="tpl-form-input" id="user-name" value="{{ v.gid.title }}" name="storage" disabled>
	                    </div>
	                    <div class="am-u-sm-9 am-u-sm-push-3">
	                        <div class="am-form-group am-form-file">
	                            <div class="tpl-form-file-img">
	                                <img src="{{ v.gid.pic }}" alt="" id="filepicurl" style="max-width:300px;max-height:300px;">
	                            </div>
	                        </div>
	                    </div>
	                    <div class="am-u-sm-9 ">
	                        <input type="text" class="tpl-form-input" id="user-name" value="￥：{{ v.price }} X {{ v.num }}" name="storage" disabled>
	                    </div>
	                </div>
	                {% endfor %}
	                <!-- 收货信息 -->
	                <div class="am-form-group">
	                    <label for="user-name" class="am-u-sm-3 am-form-label">
	                    	收货信息
	                    </label>
	                    <div class="am-u-sm-9">
	                        <input type="text" class="tpl-form-input" id="user-name" value="收货人：{{ oinfo.address.aname }}" name="storage" disabled>
	                    </div>

	                    <div class="am-u-sm-9 am-u-sm-push-3">
	                        <input type="text" class="tpl-form-input" id="user-name" value="收货地址：{{ oinfo.address.aads }}" name="storage" disabled>
	                    </div>
	                    <div class="am-u-sm-9 ">
	                        <input type="text" class="tpl-form-input" id="user-name" value="收货电话：{{ oinfo.address.aphone }}" name="storage" disabled>
	                    </div>
	                </div>
					<!-- 收货信息E -->
	            </form>
	        </div>
	    </div>
	</div>





</div>

{% endblock %}